<script setup>
import {useRouter} from 'vue-router';

  let route = useRouter()

  let username = window.sessionStorage.getItem("username")


  function cleaerUser(){
    window.sessionStorage.removeItem("username")
    route.push('/login')
  }

</script>

<template>
  <div>
      <h1>Home页面</h1>
      <h3>欢迎{{ username }}登录</h3>
      <button @click="cleaerUser()">退出登录</button>
  </div>
</template>

<style scoped>

</style>
